package com.geeke.sys.entity;

import javax.validation.constraints.NotNull;
import com.geeke.common.persistence.DataEntity;
import com.geeke.sys.entity.User;
import com.geeke.sys.entity.Role;

/**
 * 用户角色表Entity
 */
public class UserRole extends DataEntity<UserRole> {

    private static final long serialVersionUID = 1L;
    
    public UserRole() {
        super();
    }
    
    public UserRole(String id) {
        super(id);
    }

    @NotNull(message = "用户不能为空")
    private User user = new User(); // 用户
    public User getUser() {
        return user;
    }
    public void setUser(User user) {
        this.user = user;
    }

    @NotNull(message = "角色不能为空")
    private Role role = new Role(); // 角色
    public Role getRole() {
        return role;
    }
    public void setRole(Role role) {
        this.role = role;
    }

    private String remarks; // 备注
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    @Override
    public String getTableAlias() {
        return "userRole";
    }
} 